var FindProxyForURL = function(init, profiles) {
    return function(url, host) {
        "use strict";
        var result = init, scheme = url.substr(0, url.indexOf(":"));
        do {
            result = profiles[result];
            if (typeof result === "function") result = result(url, host, scheme);
        } while (typeof result !== "string" || result.charCodeAt(0) === 43);
        return result;
    };
}("+auto switch", {
    "+auto switch": function(url, host, scheme) {
        "use strict";
        if (/(?:^|\.)51test\.net$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)ict528\.com$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)sdlqzl\.com$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)nwf2e1t\.com$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)itgcs\.net$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)echromtek\.com$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)logphp\.com$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)t757\.xyz$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)9duw\.com$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)diediao5\.com$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)ishare5\.com$/.test(host)) return "+WebBlacklist";
        if (/(?:^|\.)xitongzu\.com$/.test(host)) return "+WebBlacklist";
        return "DIRECT";
    },
    "+proxy": function(url, host, scheme) {
        "use strict";
        if (/^127\.0\.0\.1$/.test(host) || /^::1$/.test(host) || /^localhost$/.test(host)) return "DIRECT";
        return "PROXY 127.0.0.1:19989";
    },
    "+WebBlacklist": function(url, host, scheme) {
        "use strict";
        if (/^127\.0\.0\.1$/.test(host) || /^::1$/.test(host) || /^localhost$/.test(host)) return "DIRECT";
        return "PROXY www.baidu.com:8088";
    }
});